<template>
	<view>
		<view class="box">
			<view class="list" v-for="(item,index) in list" @click="detail(item.id)">
				<view>{{item.title}}</view>
				<image src="/static/next.png" mode="widthFix"></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				app: getApp().globalData,
				list: []
			}
		},
		onLoad() {
			this.app.post('/api/chef/user/guize_list').then(res => {
				console.log(res)
				this.list = res
			})
		},
		methods: {
			detail(id) {
				uni.navigateTo({
					url: '/pages/sc/agreement/agreement?id=' + id
				})
			}
		}
	}
</script>

<style lang="scss">
	.box {
		width: 750rpx;
		background-color: #fff;
		margin-top: 30rpx;

		.list {
			border-top: 1px solid #eee;
			width: 690rpx;
			margin-left: 30rpx;
			height: 90rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;

			view {
				font-size: 28rpx;
			}

			image {
				width: 30rpx;
				height: 30rpx;
			}
		}

		.list:nth-child(1) {
			border-top: 0;
		}
	}
</style>